home *** CD-ROM | disk | FTP | other *** search
- Path: bubba.NMSU.Edu!usenet
- From: ghenniga@ampere.NMSU.Edu (Gary Hennigan)
- Newsgroups: comp.lang.c
- Subject: Re: Cross Compilation !!!
- Date: 04 Jan 1996 10:28:37 -0700
- Organization: New Mexico State University - Electromagnetics Group
- Sender: ghenniga@ampere.NMSU.Edu
- Message-ID: <rhtu42bvph6.fsf@ampere.NMSU.Edu>
- References: <4cdhs1$b2d@news.cic.net>
- Reply-To: ghenniga@NMSU.Edu
- NNTP-Posting-Host: ampere.nmsu.edu
- In-reply-to: akmp@phish.nether.net's message of 3 Jan 1996 09:22:09 GMT
- Cc: akmp@phish.nether.net
- X-Newsreader: Gnus v5.1
-
- In an article akmp@phish.nether.net (anil kumar m p) wrote:
- >i am working on two languages,
- >C and Fortran on SGI.
- >i am having problems (bus error -core dumped) when i
- >call Fortran functions from C.
- >can anyone help me out.
-
- Perhaps.
-
- >what about prototypes for those functions ?
-
- You'll want to prototype all the Fortran functions you're calling from
- C. Otherwise it'll get confusing, FAST!
-
- The problem is that it's often machine dependent. On the SGI (at least
- under IRIX 5.x and it's associated compilers) Fortran subroutines can
- be declared as returning "int" (see example).
-
- >also what happens to variables that i want to pass by reference
- >to fortran functions ?
-
- Umm, I believe EVERYTHING in Fortran is passed by reference, as
- opposed to C where things are passed by value! If you're not adhering
- to that you will definately get core dumps.
-
- >any help would be gladly appreciated
-
- An example would allow others to help you out more efficiently.
-
- Gary
- (ghenniga@NMSU.Edu)
-